<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:zj="http://www.zju.edu.cn" elementFormDefault="qualified">
  <xs:import namespace="http://www.zju.edu.cn" schemaLocation="EasySearchItem.xsd"/>
  <xs:element name="Toolkit">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element ref="zj:EasySearch"/>
      </xs:sequence>
      <xs:attribute name="version" type="xs:string" default="2.0"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="TableName" type="xs:string"/>
  <xs:element name="CodeField" type="xs:string"/>
  <xs:element name="NameField" type="xs:string"/>
  <xs:element name="PYField" type="xs:string"/>
  <xs:element name="ActiveField">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded"/>
      <xs:attribute name="Value" type="xs:string" default="1"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="InfoField" type="xs:string"/>
  <xs:element name="OtherFields" type="xs:string"/>
  <xs:element name="DefaultOrder" type="xs:string"/>
  <xs:element name="TopCount" type="xs:unsignedInt"/>
  <xs:element name="Search" type="xs:string"/>
  <xs:element name="Level">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="SubItem" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="TotalLength" type="xs:unsignedInt" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="SubItem">
    <xs:complexType>
      <xs:attribute name="Length" type="xs:unsignedInt" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Tree">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="BaseValue" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="ParentField" type="xs:string" use="required"/>
      <xs:attribute name="IsLeafField" type="xs:string" use="required"/>
      <xs:attribute name="LayerField" type="xs:string" use="required"/>
      <xs:attribute name="BaseSearchType">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="ParentID"/>
            <xs:enumeration value="ID"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="OnlyLeafSelect" type="xs:boolean"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="BaseValue" type="ExpressionType"/>
  <xs:element name="SQL" type="ExpressionType"/>
  <xs:element name="DataRight">
    <xs:complexType>
      <xs:attribute name="SupportData" type="xs:boolean" use="required"/>
      <xs:attribute name="OwnerField" type="xs:string" use="required"/>
      <xs:attribute name="RightType" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="ExpressionType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded"/>
    <xs:attribute name="NeedParse" type="xs:boolean"/>
    <xs:attribute name="SQLInject" type="xs:boolean"/>
    <xs:attribute name="EmptyMarco" type="xs:string"/>
  </xs:complexType>
</xs:schema>
